arm64/efi: Disable secure boot if shim is in insecure mode
authorLinn Crosetto <linn@hpe.com>
Mon, 22 Feb 2016 19:54:37 +0000 (12:54 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 27 Feb 2017 15:58:07 +0000 (15:58 +0000)
commit8f633f6eb5c6a8ac0856103b732818927c4718c7
tree61572bd5fd0b7857d5e851236f0f7fd2cdca8fd5
parent38fecbb8c70a956b920d2a71a2e3c52408186387
arm64/efi: Disable secure boot if shim is in insecure mode

Port to arm64 a patch originally written by Josh Boyer for the x86 EFI
stub.

A user can manually tell the shim boot loader to disable validation of
images it loads.  When a user does this, it creates a UEFI variable called
MokSBState that does not have the runtime attribute set.  Given that the
user explicitly disabled validation, we can honor that and not enable
secure boot mode if that variable is set.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Gbp-Pq: Topic features/all/securelevel
Gbp-Pq: Name arm64-efi-disable-secure-boot-if-shim-is-in-insecure.patch
drivers/firmware/efi/libstub/arm-stub.c